<clr-modal [(clrModalOpen)]="opened" [clrModalClosable]="false">
  <h3 class="modal-title">修改密码</h3>

  <div class="modal-body modal-height">
    <clr-alert [clrAlertType]="level" [clrAlertClosable]="false" *ngIf="alertOpen">
      <clr-alert-item>
        <span class="alert-text">
            {{msg}}
        </span>
      </clr-alert-item>
    </clr-alert>
    <form clrForm #passform="ngForm">
      <clr-password-container>
        <label>原密码:</label>
        <input clrPassword size=45 type="text" [(ngModel)]="oldPassword" name="old" required>
      </clr-password-container>

      <clr-password-container>
        <label>新密码:</label>
        <input clrPassword size=45 type="text" [(ngModel)]="newPassword" name="new" required>
      </clr-password-container>

      <clr-password-container>
        <label>确认新密码:</label>
        <input clrPassword size=45 type="text" [(ngModel)]="confirmPassword" name="confirm" required>
      </clr-password-container>
      <div class="modal-footer">
        <button type="button" class="btn btn-outline" (click)="onCancel()">取消</button>
        <button type="submit" class="btn btn-primary" (click)="onSubmit()" [disabled]="passform.invalid">
          <i *ngIf="submitGoing" class="fa fa-spinner fa-pulse"></i>提交
        </button>
      </div>
    </form>
  </div>
</clr-modal>
